package com.cmb;

public class AgedBrieProduct extends Product
{
    public AgedBrieProduct(String name, int sellIn, int quality) {
        super(name, sellIn, quality);

    }

    @Override
    public void update() {
        int quality = getQuality();
        if (++quality > 50) {
            setQuality(50);
        } else {
            setQuality(quality);
        }
        int sellIn = getSellIn();
        setSellIn(--sellIn);
    }
}
